<?php
echo $this->Form->create('Owner');
echo $this->Form->hidden("Owner.property_id");
echo $this->Form->input("Owner.nombres");
echo $this->Form->input("Owner.primer_apellido");
echo $this->Form->input("Owner.segundo_apellido");
echo $this->Form->input("Owner.documento");
?>
<?php
echo $this->Ajax->observeField('OwnerDepartamentId', array(
    'url' => array('action' => 'select'),
    'frequency' => 0.2,
    'update' => 'ciudades'
        )
);
?>
<?php echo $this->Form->input('Owner.departament_id', array('label' => 'Departamento', 'empty' => 'Seleccione departamento')); ?>

<div id="ciudades">
    <?php echo $this->Form->input('Owner.city_id', array('label' => 'Municipio', 'class' => '')); ?>
</div>

<?php
echo $this->Ajax->submit('Guardar', array('url' => array('controller' => 'Owners', 'action' => 'add', $this->data['Owner']['property_id']), 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading'));
echo $this->Form->end();
?>
